package com.fzj.example.design.strategy;

/**
* @Description 使用环境
* @Author  fanzj
* @Date   2020/5/10 5:58 下午
* @Param
* @Return
* @Exception
*
*/
public class Context {
    private Strategy strategy;

    public Context() {
    }

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    void addUser(){
        this.strategy.addUser();
    }

    void deleteUser(){
        this.strategy.deleteUser();
    }
    void updateUser(){
        this.strategy.updateUser();
    }
}
